﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Hired1Div.master" AutoEventWireup="true"
    CodeBehind="empViewJob.aspx.cs" Inherits="Hired.empViewJob" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
    <style type="text/css">
        .headerText
        {
            float: left;
            margin-left: 10px;
            font-family: "Franklin Gothic Demi" , "Arial";
            font-size: 30px;
        }
        .div1
        {
            margin-top: 30px;
            font-family: "Helvetica World" , Arial;
            font-size: 12px;
            vertical-align: middle;
        }
        .identifier
        {
            text-align: left;
            padding-right: 5px;
            font-family: "Franklin Gothic Demi" , Arial;
            font-size: 15px;
        }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainPlaceHolder" runat="server">
    <asp:UpdatePanel ID="upPanel" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlViewJobs" runat="server">
            <div class="headerText">View All Jobs</div>
            <div class="line-clear"><br /></div>
                <asp:GridView style="float:left;" ID="gvViewJobs" runat="server" AllowPaging="True" 
                    AutoGenerateColumns="False" CellPadding="10" GridLines="Horizontal" 
                    onrowcommand="gvViewJobs_RowCommand" AllowSorting="True">
                    <AlternatingRowStyle BackColor="#CCCCFF" />
                    <Columns>
                        <asp:CommandField ShowEditButton="True" />
                        <asp:TemplateField HeaderText="Title">
                            
                            <ItemTemplate>
                                <asp:LinkButton ID="linkBtnTitle" runat="server" Text='<%# Eval("Title") %>' PostBackUrl=<%#"~/viewjob.aspx?id=" + Eval("JobID") %>></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Industry" HeaderText="Industry" />
                        <asp:BoundField DataField="Description" HeaderText="Description" />
                        <asp:BoundField DataField="MinimumQualifications" 
                            HeaderText="Min. Qualifications" />
                        <asp:BoundField DataField="EstimatedSalary" HeaderText="Estimated Salary" />
                        <asp:TemplateField ShowHeader="False" HeaderText="Delete">
                        <ItemTemplate>
                            <asp:ImageButton ID="btnDelete" runat="server" ImageUrl="../images/deleteicon.png"
                                CausesValidation="False" CommandName="Delete" CommandArgument='<%# Eval("JobID") %>' />
                            <asp:Panel ID="pnlDeletePopup" runat="server" CssClass="modalPopup">
                                Are you sure you wish to job
                                <asp:Label ID="lblUsername" runat="server" Text='<%# Eval("Title") %>' />?
                                <br />
                                <br />
                                <asp:Button ID="btnCancel" Style="float: right" runat="server" Text="Cancel" />
                                <asp:Button ID="btnConfirm" Style="float: right; margin-right: 25px;" runat="server" Text="OK" />
                                <asp:ConfirmButtonExtender ID="btnDelete_ConfirmButtonExtender" runat="server" ConfirmText=""
                                    Enabled="True" TargetControlID="btnDelete" DisplayModalPopupID="DeleteModalPopupExtender">
                                </asp:ConfirmButtonExtender>
                                <asp:ModalPopupExtender ID="DeleteModalPopupExtender" runat="server" TargetControlID="btnDelete"
                                    DropShadow="True" PopupControlID="pnlDeletePopUp" CancelControlID="btnCancel"
                                    OkControlID="btnConfirm" BackgroundCssClass="modalBackground">
                                </asp:ModalPopupExtender>
                                <br />

                            </asp:Panel>
                        </ItemTemplate>

                    </asp:TemplateField>
                    </Columns>
                    <HeaderStyle BackColor="#9933FF" ForeColor="White" />
                    <PagerStyle BackColor="#9900FF" ForeColor="White" />
                </asp:GridView>
               
            </asp:Panel>
            <asp:Panel ID="pnlViewApplications" runat="server">
            <div class="headerText">View Job Applications</div>
            <div class="line-clear"><br /></div>
                <asp:GridView ID="gvJobApplications" runat="server" AllowPaging="True" 
                    AllowSorting="True" AutoGenerateColumns="False" CellPadding="10" 
                    GridLines="Horizontal">
                    <AlternatingRowStyle BackColor="#CCCCFF" />
                    <Columns>
                        <asp:BoundField DataField="Title" HeaderText="Title" />
                        <asp:TemplateField HeaderText="Username">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Username") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:LinkButton ID="linkBtnUsername" runat="server" 
                                    Text='<%# Eval("Username") %>' PostBackUrl=<%# "viewprofile.aspx?username=" + Eval("Username") %>></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Contents" HeaderText="Cover Letter" />
                        <asp:TemplateField HeaderText="Resume">
                            
                            <ItemTemplate>
                                <asp:LinkButton ID="linkBtnResume" runat="server" Text="Resume" PostBackUrl=<%# Eval("Resume") %>></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle BackColor="#9933FF" ForeColor="White" />
                    <PagerStyle BackColor="#9900FF" ForeColor="White" />
                </asp:GridView>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
